package com.ruoyi.project.system.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.SysOpinionMapper;
import com.ruoyi.project.system.domain.SysOpinion;
import com.ruoyi.project.system.service.ISysOpinionService;

/**
 * 意见反馈Service业务层处理
 * 
 * @author jjp
 * @date 2020-04-15
 */
@Service
public class SysOpinionServiceImpl implements ISysOpinionService
{
    @Autowired
    private SysOpinionMapper sysOpinionMapper;

    /**
     * 查询意见反馈
     * 
     * @param opinionId 意见反馈ID
     * @return 意见反馈
     */
    @Override
    public SysOpinion selectSysOpinionById(Long opinionId)
    {
        return sysOpinionMapper.selectSysOpinionById(opinionId);
    }

    /**
     * 查询意见反馈列表
     * 
     * @param sysOpinion 意见反馈
     * @return 意见反馈
     */
    @Override
    public List<SysOpinion> selectSysOpinionList(SysOpinion sysOpinion)
    {
        return sysOpinionMapper.selectSysOpinionList(sysOpinion);
    }

    /**
     * 新增意见反馈
     * 
     * @param sysOpinion 意见反馈
     * @return 结果
     */
    @Override
    public int insertSysOpinion(SysOpinion sysOpinion)
    {
        sysOpinion.setCreateTime(DateUtils.getNowDate());
        return sysOpinionMapper.insertSysOpinion(sysOpinion);
    }

    /**
     * 修改意见反馈
     * 
     * @param sysOpinion 意见反馈
     * @return 结果
     */
    @Override
    public int updateSysOpinion(SysOpinion sysOpinion)
    {
        return sysOpinionMapper.updateSysOpinion(sysOpinion);
    }

    /**
     * 批量删除意见反馈
     * 
     * @param opinionIds 需要删除的意见反馈ID
     * @return 结果
     */
    @Override
    public int deleteSysOpinionByIds(Long[] opinionIds)
    {
        return sysOpinionMapper.deleteSysOpinionByIds(opinionIds);
    }

    /**
     * 删除意见反馈信息
     * 
     * @param opinionId 意见反馈ID
     * @return 结果
     */
    @Override
    public int deleteSysOpinionById(Long opinionId)
    {
        return sysOpinionMapper.deleteSysOpinionById(opinionId);
    }

    @Override
    public List<SysOpinion> queryUseropinion(Long mobileUserId) {
        return sysOpinionMapper.queryUseropinion(mobileUserId);
    }

    @Override
    public List<SysOpinion> queryMobileUseropinion(Long mobileUserId) {
        return sysOpinionMapper.queryMobileUseropinion(mobileUserId);
    }

    @Override
    public SysOpinion selectDes(SysOpinion sysOpinion) {
        return sysOpinionMapper.selectDes(sysOpinion);
    }


}
